﻿using UnityEngine;
using System.Collections;

public class GameController : MonoBehaviour 
{
    public bool player1_turn = true;
    public bool player2_turn = false;
    public bool player3_turn = false;
    public bool player4_turn = false;
    public bool player5_turn = false;


	// Use this for initialization
	void Start () 
    {

	}
	
	// Update is called once per frame
	void Update () 
    {
        
	}

    void FixedUpdate()
    {
        if(Input.GetKeyDown(KeyCode.A))
        {
            print("inside");
            EndTurn();
        }
    }

    void EndTurn()
    {
        if(player1_turn)
        {
            player1_turn = false;
            player2_turn = true;
        }
        else if (player2_turn)
        {
            player2_turn = false;
            player3_turn = true;
        }
        else if (player3_turn)
        {
            player3_turn = false;
            player4_turn = true;
        }
        else if (player4_turn)
        {
            player4_turn = false;
            player5_turn = true;
        }
        else if (player5_turn)
        {
            player5_turn = false;
            player1_turn = true;
        }
    }
}
